import React from 'react'
import '../../Static/font/iconfont.css'
import 'antd-mobile/dist/antd-mobile.css'
import './Password.css'
import { NavBar, Icon } from 'antd-mobile'
import axios from 'axios'
import { Button,WingBlank, WhiteSpace } from 'antd-mobile';

class Password extends React.Component {
    constructor() {
        super()
        this.state = {

        }
    }
    inputChange(e,val){
        if(val==='shop_email'){
            this.setState({
                shop_email:e.target.value
            })
        }else if(val ==='shop_pwd'){
            this.setState({
                shop_pwd:e.target.value
            })
        }else{
            this.setState({
                code:e.target.value
            })
        }
        
    }

    togoMyIncome = () => {
        this.props.history.push('/Home/MyIncome')
    }
    render() {
        return (
            /* html */
            <div>
                <NavBar
                mode="light"
                icon={<Icon type="left" onClick={this.togoMyIncome}/>}
                onLeftClick={() => console.log('onLeftClick')}
                rightContent={[
                    <Icon key="0" type="search" style={{ marginRight: '16px' }} />,
                    <Icon key="1" type="ellipsis" />,
                ]}
                >支付密码</NavBar>
                <WingBlank>
                    <div className='myinput'>
                        <input type="text"  onChange={(e)=>this.inputChange(e,'shop_pay_pwd')} placeholder='请输入原密码'/>
                        <input type="pwdType"  onChange={(e)=>this.inputChange(e,'newshop_pay_pwd')} placeholder='请输入新密码'/>
                        <input type="text" onChange={(e)=>this.inputChange(e,'newshop_pay_pwd')} placeholder='再一次输入新密码'/>
                        <Button type="primary" size="small" inline onClick={this.gotoNewPassword}>确定修改</Button>
                    </div>
                
                </WingBlank>
            </div>
        
        )
    }
}

export default Password